<template>
<div class="category-header">
 
  <div class="home-header">
    <div class="jt" @click="backPage">
      <i class="iconfont icon-jiantou-copy"></i>
    </div>
    <div class="search" @click="goSearch">
      <i class="iconfont icon-sousuo" ></i>
    </div>
    <slot></slot>
  </div>
   
</div>
</template>

<script>
export default {
  methods: {
    goSearch() {
      this.$router.push({
        name: "search",
      });
    },
    backPage(){
      this.$router.back();
    }
  },
  created() {

  },
};
</script>

<style lang="less" scoped>
.category-header{
  .home-header {
  background-color: #fff !important;
  height: 4.4rem;
  width: 100%;
  background-color: transparent;
  display: flex;
  justify-content: space-around;
  align-items: center;
  position: fixed;
  top: 0;
  // position: relative;
  z-index: 6;
  .search {
    // width: 88%;
    flex: 1;
    height: 3rem;
    text-indent: 2em;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 3rem;
    line-height: 3rem;
    box-sizing: border-box;
    padding-right: 1.5rem;
    margin-right: 1.5rem;
    span {
      color: #b3a6b3;
      font-size: 1.3rem;
    }
    .icon-sousuo {
      float: right;
      color: #b3a6b3;
    }
  }
  .jt{
      width: 3rem;
    font-size: 1.6rem;
    color: #b3a6b3;
    margin-left: 0.2rem;
  }
}
}

.iconfont{
  font-size: 2.1rem;
}
</style>